package br.com.gestaofacil.log.api.aspecto;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.JoinPoint;

public class LoggingErrorAspect
{
    private Log log = LogFactory.getLog(this.getClass());
    
    public void logAfterThrowing(JoinPoint joinPoint, Throwable e)
    {
        log.error("An exception has been thrown in "+ joinPoint.getSignature().getName() + "()");
        log.error("Cause :"+e.getCause());
        log.error("", e);
        
    }
    
}